<template lang="html">
   <div class="form">
     <input type="text" v-model="title" value="">
     <br/>
     <textarea type="text" v-model="content"></textarea>
     <br/>
     <button @click="create">创建主题帖</button>
   </div>
</template>

<script>
import axios from '~/plugins/axios'

export default {
  data(){
    return {
      title:'',
      content:''
    }
  },
  methods:{
    async create(){
      this.$emit("create",{title: this.title, content: this.content});
      this.title = "";
      this.content = "";

    }
  }
}
</script>

<style lang="css" scoped>
    .form{
        background-color: #987;
    }

    .form > input .form > textarea{
        display: block;
    }
</style>
